package com.poetize.plus.enums;

import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.security.MacAlgorithm;
import lombok.Getter;

/**
 *
 * jwt加密算法枚举
 *
 * @author zuosy
 * @created 2024/3/28 15:29
 */
@Getter
public enum AlgorithmEnum {

    HS256(Jwts.SIG.HS256, 32),
    HS384(Jwts.SIG.HS384, 48),
    HS512(Jwts.SIG.HS512, 64);

    /**
     * 算法类型
     */
    public final MacAlgorithm type;

    /**
     * 字节长度
     */
    public final Integer length;

    AlgorithmEnum(MacAlgorithm type, Integer length) {
        this.type = type;
        this.length = length;
    }
}
